package com.shujia.wyh.day08;

/*
    截取功能
    public String substring(int start)
    public String substring(int start,int end)

 */
public class StringBufferDemo4 {
    public static void main(String[] args) {
        StringBuffer sb = new StringBuffer();
        sb.append("hello").append(12345).append(12.34).append(true);
        System.out.println(sb);

//        String s1 = sb.substring(5);
//        System.out.println(sb);
//        System.out.println(s1);

        //public String substring(int start,int end)
        String s2 = sb.substring(5, 15);
        System.out.println(s2);
        System.out.println(sb);

    }
}
